package pers.dnf.test.java.springcloud.client.ribbon.api;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author dengfan
 * @version 1.0
 * @description
 * @date 2018/9/12 0012 13:08
 */
@RestController
public class RibbonConsumerAPI {

    @Autowired
    private RestTemplate restTemplate;

    @RequestMapping(value="/add")
    public String add(){
        return restTemplate.getForEntity("http://ops-service-dnf/add?a=10&b=20",String.class).getBody();
    }
}
